<template>
	<view class="mm-input-count">
		<text class="mm-input-count__current">{{ current.length }}</text>
		<text>/</text>
		<text class="mm-input-count__limit">{{ limit }}</text>
	</view>
</template>

<script>
	/**
	 * input textarea 等字数计数组件
	 */
	export default {
		name: 'mm-input-count',
		props: {
			// 限制输入数
			limit: {
				type: String,
				default: ''
			},
			// 当前输入数
			current: {
				type: [Number, String],
				default: 0
			}
		}
	}
</script>

<style lang="scss" scoped>
	.mm-input-count {
		font-size: 26rpx;
		color: #c0c4cc;
		line-height: 60rpx;
		&__current {
			color: theme(1);
		}
	}
</style>
